package com.ruoyi.project.system.mapper;

import com.ruoyi.project.system.domain.TempWeekDaily;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

@Mapper
public interface TempWeekDailyMapper {

    // 原有方法
    void truncateTable();
    void batchInsert(@Param("list") List<TempWeekDaily> list);
    void deleteByDate(@Param("date") Date date);

    // 新增：按「科室+日期」查询值班医生（核心查询方法）
    List<TempWeekDaily> selectByDeptAndDate(
            @Param("department") String department,
            @Param("date") String date
    );

    // 新增：按日期查询所有值班医生
    List<TempWeekDaily> selectByDate(@Param("date") String date);
    
    List<TempWeekDaily> selectTodayByTimeIdParity(String today, int timeIdParity);

}